package no.nordicsemi.android.nrfmesh.database.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;

import java.util.List;

import no.nordicsemi.android.nrfmesh.database.entity.ReceivedProfile;
@Dao
public interface ReceivedProfileDao {

    // 插入接收配置
    @Insert
    void insertReceivedProfile(ReceivedProfile profile);

    // 查询所有接收配置
    @Query("SELECT * FROM received_profiles")
    List<ReceivedProfile> getAllReceivedProfiles();

    // 根据 ID 查询某个接收配置
    @Query("SELECT * FROM received_profiles WHERE id = :id LIMIT 1")
    ReceivedProfile getReceivedProfileById(int id);

    // 删除接收配置
    @Delete
    void deleteReceivedProfile(ReceivedProfile profile);
}
